package com.xja.webchat.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.xja.webchat.entity.Space;
import com.xja.webchat.mapper.SpaceMapper;
import com.xja.webchat.service.SpaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.beans.Transient;
import java.util.List;
@Service("spaceService")
public class SpaceServiceImpl implements SpaceService {
    @Autowired
    private SpaceMapper spaceMapper;

    @Override
    @Transactional(readOnly = true)
    public Page<Space> selectHaoYouDongTai(Integer npage, Integer userid) {
        PageHelper.startPage(npage,2);
        return  (Page<Space>)spaceMapper.selectHaoYouDongTai(2);
    }
}
